package cn.edu.gduf.luowowo.search.query;

import cn.edu.gduf.luowowo.common.query.QueryObject;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class StrategySearchQuery extends QueryObject {
    public static final int TYPE_ABROAD = 0; //国外
    public static final int TYPE_PROVINCE = 1; //国内省份
    public static final int TYPE_THEME = 2; //主题

    private String orderBy = "viewnum";
    private int type = -1;
    private int typeValue = -1;

    public String getType() {
        if (type == StrategySearchQuery.TYPE_ABROAD) {
            return "countryId";
        } else if (type == StrategySearchQuery.TYPE_PROVINCE) {
            return "provinceId";
        } else if (type == StrategySearchQuery.TYPE_THEME) {
            return "themeId";
        } else {
            return null;
        }
    }
}
